package com.ybkj.daijia.server.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ybkj.daijia.common.DateTimeSerialize;
import com.ybkj.daijia.common.TimeSerialize;
import java.math.BigDecimal;
import java.util.Date;
import org.springframework.util.StringUtils;

/**
 * 代驾临时订单
 *
 * @author Shine
 */
public class OrderTemp extends Base {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private String fromPlace;// 代驾地点

    private String clientName;// 客户姓名

    private String clientPhone;// 客户手机

    private String userPhone;// 使用人手机

    private Long clientId;// 客户id

    private Double clientLongitude; // 客户经度

    private Double clientLatitude; // 客户纬度

    private String toPlace;// 目的地

    private Double toPlaceLongitude; // 目的地经度

    private Double toPlaceLatitude; // 目的地纬度

    private Date serverTime;// 服务时间

    private BigDecimal shouldCash; // 预算金额

    private BigDecimal prepayCash; // 预付金额

    private Long companyId;

    private Long couponId;// 优惠券

    private boolean treatment;// 预支付是否成功付款

    private String orderNoRenBao;// 人保俱乐部订单号

    private String cuponNoRenBao;// 凭证码

    private String preferentialType;// 优惠类型

    public String getPreferentialType() {
        return preferentialType;
    }

    public void setPreferentialType(String preferentialType) {
        this.preferentialType = preferentialType;
    }

    public String getOrderNoRenBao() {
        return orderNoRenBao;
    }

    public void setOrderNoRenBao(String orderNoRenBao) {
        this.orderNoRenBao = orderNoRenBao;
    }

    public String getCuponNoRenBao() {
        return cuponNoRenBao;
    }

    public void setCuponNoRenBao(String cuponNoRenBao) {
        this.cuponNoRenBao = cuponNoRenBao;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public boolean isTreatment() {
        return treatment;
    }

    public void setTreatment(boolean treatment) {
        this.treatment = treatment;
    }

    public String getFromPlace() {
        if (StringUtils.isEmpty(fromPlace)) {
            return "";
        }
        return fromPlace;
    }

    public void setFromPlace(String fromPlace) {
        this.fromPlace = fromPlace;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getClientPhone() {
        return clientPhone;
    }

    public void setClientPhone(String clientPhone) {
        this.clientPhone = clientPhone;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public Date getServerTime() {
        return serverTime;
    }

    public void setServerTime(Date serverTime) {
        this.serverTime = serverTime;
    }

    @JsonSerialize(using = TimeSerialize.class)
    public Date getServerTimeHI() {
        return serverTime;
    }

    @JsonSerialize(using = DateTimeSerialize.class)
    public Date getServerTimeMDHI() {
        return serverTime;
    }

    public Long getClientId() {
        return clientId;
    }

    public void setClientId(Long clientId) {
        this.clientId = clientId;
    }

    public BigDecimal getShouldCash() {
        if (null == shouldCash) {
            return BigDecimal.ZERO;
        }
        return shouldCash;
    }

    public void setShouldCash(BigDecimal shouldCash) {
        this.shouldCash = shouldCash;
    }

    public BigDecimal getPrepayCash() {
        if (null == prepayCash) {
            return BigDecimal.ZERO;
        }
        return prepayCash;
    }

    public void setPrepayCash(BigDecimal prepayCash) {
        this.prepayCash = prepayCash;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Double getClientLongitude() {
        return clientLongitude;
    }

    public void setClientLongitude(Double clientLongitude) {
        this.clientLongitude = clientLongitude;
    }

    public Double getClientLatitude() {
        return clientLatitude;
    }

    public void setClientLatitude(Double clientLatitude) {
        this.clientLatitude = clientLatitude;
    }

    public String getToPlace() {
        if (StringUtils.isEmpty(toPlace)) {
            return "";
        }
        return toPlace;
    }

    public void setToPlace(String toPlace) {
        this.toPlace = toPlace;
    }

    public Double getToPlaceLongitude() {
        return toPlaceLongitude;
    }

    public void setToPlaceLongitude(Double toPlaceLongitude) {
        this.toPlaceLongitude = toPlaceLongitude;
    }

    public Double getToPlaceLatitude() {
        return toPlaceLatitude;
    }

    public void setToPlaceLatitude(Double toPlaceLatitude) {
        this.toPlaceLatitude = toPlaceLatitude;
    }

}
